﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using NUnit.Framework;

namespace INSTA.MusiqueStore.Library.Tests
{
    [TestFixture]
    class TestTips
    {

        [Test]
        public void TestToDisplayableTimeSeconds()
        {
            var res = Tips.ToDisplayableTime(59);
            Assert.IsTrue(res =="00:59");
        }

        [Test]
        public void TestToDisplayableTimeMinutes()
        {
            var res = Tips.ToDisplayableTime(3599);
            Assert.IsTrue(res == "59:59");
        }

        [Test]
        public void TestToDisplayableTimeHours()
        {
            var res = Tips.ToDisplayableTime(10000);
            Assert.IsTrue(res == "02:46:40");
        }

        [Test]
        public void TestAddZeroToTimeGood()
        {
            var s = "2";
            Assert.IsTrue(Library.Tips.AddZeroToTime(s) == "02");
        }

        [Test]
        public void TestAddZeroToTimeBad()
        {
            var s = "02";
            Assert.IsTrue(Library.Tips.AddZeroToTime(s) == "02");
        }

    }
}
